<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2019/11/6
  Time: 8:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>住院办理_添加</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/vendors/iconfonts/mdi/css/materialdesignicons.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/vendors/css/vendor.bundle.base.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
    <!-- endinject -->
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.png" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/page.css"/>
</head>
<body>
<div class="container-scroller">
    <nav class="navbar default-layout-navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
        <div class="text-center navbar-brand-wrapper d-flex align-items-center justify-content-center">
            <a class="navbar-brand brand-logo" href="index.html"><img src="${pageContext.request.contextPath}/images/logo.svg" alt="logo"/></a>
            <a class="navbar-brand brand-logo-mini" href="index.html"><img src="${pageContext.request.contextPath}/images/logo-mini.svg" alt="logo"/></a>
        </div>
        <div class="navbar-menu-wrapper d-flex align-items-stretch">
            <div class="search-field d-none d-md-block">
                <form class="d-flex align-items-center h-100" action="#">
                    <div class="input-group">
                        <div class="input-group-prepend bg-transparent">
                            <i class="input-group-text border-0 mdi mdi-magnify"></i>
                        </div>
                        <input type="text" class="form-control bg-transparent border-0" placeholder="search ">
                    </div>
                </form>
            </div>
            <ul class="navbar-nav navbar-nav-right">
                <li class="nav-item nav-profile dropdown">
                    <a class="nav-link dropdown-toggle" id="profileDropdown" href="#" data-toggle="dropdown" aria-expanded="false">
                        <div class="nav-profile-img">
                            <img src="${pageContext.request.contextPath}/images/faces/face1.jpg" alt="image">
                            <span class="availability-status online"></span>
                        </div>
                        <div class="nav-profile-text">
                            <p class="mb-1 text-black">David Greymaax</p>
                        </div>
                    </a>
                    <div class="dropdown-menu navbar-dropdown" aria-labelledby="profileDropdown">
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="#"><i class="mdi mdi-logout mr-2 text-primary"></i>登出</a>
                    </div>
                </li>

            </ul>
            <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
                <span class="mdi mdi-menu"></span>
            </button>
        </div>
    </nav>
    <!-- partial -->
    <div class="container-fluid page-body-wrapper">
        <nav class="sidebar sidebar-offcanvas" id="sidebar">
            <ul class="nav">
                <li class="nav-item nav-profile">
                    <a href="#" class="nav-link">
                        <div class="nav-profile-image">
                            <img src="${pageContext.request.contextPath}/images/faces/face1.jpg" alt="profile">
                            <span class="login-status online"></span> <!--change to offline or busy as needed-->
                        </div>
                        <div class="nav-profile-text d-flex flex-column">
                            <span class="font-weight-bold mb-2">David Grey. H</span>
                            <span class="text-secondary text-small">Project Manager</span>
                        </div>
                        <i class="mdi mdi-bookmark-check text-success nav-profile-badge"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getDashboard">
                        <span class="menu-title">Dashboard</span>
                        <i class="mdi mdi-home menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getRegistrationList">
                        <span class="menu-title">挂号信息管理</span>
                        <i class="mdi mdi-contacts menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getInHospitalList">
                        <span class="menu-title">住院办理</span>
                        <i class="mdi mdi-crosshairs-gps menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/InHospitalAccount">
                        <span class="menu-title">住院结算</span>
                        <i class="mdi mdi-ambulance menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getSendDrugList">
                        <span class="menu-title">在院发药</span>
                        <i class="mdi mdi-food menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getDrugList">
                        <span class="menu-title">药品管理</span>
                        <i class="mdi mdi-hospital menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getCPRList">
                        <span class="menu-title">检查收费项目登记</span>
                        <i class="mdi mdi-highway menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getChargeProjectList">
                        <span class="menu-title">收费项目管理</span>
                        <i class="mdi mdi-key-plus menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getDoctorList">
                        <span class="menu-title">门诊医生管理</span>
                        <i class="mdi mdi-lock-plus menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getUserList">
                        <span class="menu-title">用户管理</span>
                        <i class="mdi mdi-new-box menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/getRolePage">
                        <span class="menu-title">角色管理</span>
                        <i class="mdi mdi-human menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/12_resource_management.html">
                        <span class="menu-title">资源管理</span>
                        <i class="mdi mdi-library-books menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="${pageContext.request.contextPath}/13_password_management.html">
                        <span class="menu-title">密码管理</span>
                        <i class="mdi mdi-compass-outline menu-icon"></i>
                    </a>
                </li>
                <div class="tlinks">Collect from <a href="http://www.cssmoban.com/" >企业网站模板</a></div>
            </ul>
        </nav>
        <!-- partial -->
        <div class="main-panel">
            <div class="content-wrapper">

                <div class="col-12 grid-margin stretch-card">

                    <div class="card">
                        <div class="card-body">
                            <form class="forms-sample" method="post" action="${pageContext.request.contextPath}/addInHospital">
                                <div class="form-group row">
                                    <label for="rId" class="col-sm-3 col-form-label">病历号:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="rId" name="rId" placeholder="病历号,当输入完病历号之后,个人信息会自动带入">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="rName" class="col-sm-3 col-form-label">姓名:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="rName" placeholder="姓名">
                                    </div>
                                </div>
                               <%-- <div class="form-group row">
                                    <label for="rCard" class="col-sm-3 col-form-label">证件类型:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="rCard" placeholder="身份证">
                                    </div>
                                </div>--%>

                                <!-- <div class="form-group row">
                                  <label class="col-sm-3 col-form-label">证件类型:</label>
                                  <div class="col-sm-9">
                                    <select class="form-control">
                                      <option>身份证</option>
                                      <option>驾驶证</option>
                                      <option>护照</option>
                                    </select>
                                  </div>
                                </div> -->

                                <div class="form-group row">
                                    <label for="rCard" class="col-sm-3 col-form-label">证件号:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="rCard" placeholder="证件号">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="rSsno" class="col-sm-3 col-form-label">社保号:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="rSsno" placeholder="社保号">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label for="rTel" class="col-sm-3 col-form-label">联系电话:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="rTel" placeholder="联系电话">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label  class="col-sm-3 col-form-label">是否自费:</label>
                                    <div class="col-sm-9">
                                        <div class="form-check" style="display: inline-block;margin-right: 10px;">
                                            <label class="form-check-label">
                                                <input type="radio" class="form-check-input" name="dSelfpay" id="dSelfpay1" value="1">
                                                否
                                            </label>
                                        </div>
                                        <div class="form-check" style="display: inline-block;">
                                            <label class="form-check-label">
                                                <input type="radio" class="form-check-input" name="dSelfpay" id="dSelfpay0" value="0">
                                                是
                                            </label>
                                        </div>

                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label  class="col-sm-3 col-form-label">性别:</label>
                                    <div class="col-sm-9">
                                        <div class="form-check" style="display: inline-block;margin-right: 10px;">
                                            <label class="form-check-label">
                                                <input type="radio" class="form-check-input" name="rGender" id="rGender1" value="男">
                                                男
                                            </label>
                                        </div>
                                        <div class="form-check" style="display: inline-block;">
                                            <label class="form-check-label">
                                                <input type="radio" class="form-check-input" name="rGender" id="rGender0" value="女">
                                                女
                                            </label>
                                        </div>

                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label for="rAge" class="col-sm-3 col-form-label">年龄:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="rAge" placeholder="年龄">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label for="rJob" class="col-sm-3 col-form-label">职业:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="rJob" placeholder="职业">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label  class="col-sm-3 col-form-label">初复诊:</label>
                                    <div class="col-sm-9">
                                        <div class="form-check" style="display: inline-block;margin-right: 10px;">
                                            <label class="form-check-label">
                                                <input type="radio" class="form-check-input"  id="rFirst0" value="0">
                                                初诊
                                            </label>
                                        </div>
                                        <div class="form-check" style="display: inline-block;">
                                            <label class="form-check-label">
                                                <input type="radio" class="form-check-input"  id="rFirst1" value="1">
                                                复诊
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label">所挂科室:</label>
                                    <div class="col-sm-9">
                                        <select class="form-control">
                                            <option>America</option>
                                            <option>Italy</option>
                                            <option>Russia</option>
                                            <option>Britain</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label">指定医生:</label>
                                    <div class="col-sm-9">
                                        <select class="form-control">
                                            <option>America</option>
                                            <option>Italy</option>
                                            <option>Russia</option>
                                            <option>Britain</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label">备注:</label>
                                    <div class="col-sm-9">
                                        <textarea class="form-control" id="rMark" ></textarea>
                                    </div>
                                </div>



                                <div class="form-group row">
                                    <label for="ihNurse" class="col-sm-3 col-form-label">护理:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="ihNurse" name="ihNurse" placeholder="护理">
                                    </div>
                                </div>


                                <div class="form-group row">
                                    <label for="ihBedno" class="col-sm-3 col-form-label">床位号:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="ihBedno" name="ihBedno" placeholder="床位号">
                                    </div>
                                </div>


                                <div class="form-group row">
                                    <label for="ihMoney" class="col-sm-3 col-form-label">缴费押金:</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" id="ihMoney" name="ihMoney" placeholder="缴费押金">
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-3 col-form-label">病情:</label>
                                    <div class="col-sm-9">
                                        <textarea class="form-control" id="ihInfo" name="ihInfo"></textarea>
                                    </div>
                                </div>


                                <button type="submit" class="btn btn-gradient-primary mr-2">保存</button>
                                <a href="03_in_the_hospital_for.html" class="btn btn-light">返回列表</a>
                            </form>
                        </div>
                    </div>
                </div>

            </div>

            <footer class="footer">
                <div class="d-sm-flex justify-content-center justify-content-sm-between">
                    <span class="text-muted text-center text-sm-left d-block d-sm-inline-block">Copyright © 2019 <a href="" target="_blank">xxx医院</a>. All rights reserved. </span>
                    <span class="float-none float-sm-right d-block mt-1 mt-sm-0 text-center">程序视界 & I and
              <i class="mdi mdi-heart text-danger"></i> - 更多案例 <a href="https://www.github.com/" target="_blank" title="全球最大的程序社区">Github</a> - Collect from <a href="http://www.github.com/" title="网页模板" target="_blank">社区</a></span>
                </div>
            </footer>
        </div>
    </div>
    <!-- page-body-wrapper ends -->
</div>
<!-- container-scroller -->

<!-- plugins:js -->
<script src="${pageContext.request.contextPath}/vendors/js/vendor.bundle.base.js"></script>
<script src="${pageContext.request.contextPath}/vendors/js/vendor.bundle.addons.js"></script>
<script src="${pageContext.request.contextPath}/js/off-canvas.js"></script>
<script src="${pageContext.request.contextPath}/js/misc.js"></script>
<script src="${pageContext.request.contextPath}/js/dashboard.js"></script>
<!-- End custom js for this page-->

<script>

    $("#rId").blur(function(){
    //获取数据
        $.getJSON("/getRegistrationById",{rId:this.value},function(data){
            console.log(data);
            $("#rName").val(data.rName);
            $("#rCard").val(data.rCard);
            $("#rSsno").val(data.rSsno);
            $("#rTel").val(data.rTel);
            if (data.dSelfpay==1){
                $("#dSelfpay1").attr({"checked":"true"})
            }
            if (data.dSelfpay==0){
                $("#dSelfpay0").attr({"checked":"true"})
            }
            if (data.rGender=='男'){
                $("#rGender1").attr({"checked":"true"})
            }
            if (data.rGender=='女'){
                $("#rGender0").attr({"checked":"true"})
            }
            $("#rAge").val(data.rAge);
            $("#rJob").val(data.rJob);
            if (data.rFirst==0){
                $("#rFirst0").attr({"checked":"true"})
            }
            if (data.rFirst==1){
                $("#rFirst1").attr({"checked":"true"})
            }
            $("#rMark").val(data.rMark);
        });
    });




</script>
</body>

</html>

